<?php

class JCjqGridInclude extends CWidget {  
    const JC_PATH = 'jqGrid431';
    const JC_LANGUAGE = 'cn';
    public function run()
   {
      $dir = dirname(__FILE__).DIRECTORY_SEPARATOR.JCjqGridInclude::JC_PATH;
      $baseUrl = Yii::app()->getAssetManager()->publish($dir);

      $clientScript = Yii::app()->getClientScript();
//
      $clientScript->registerCoreScript('jqGrid');
      $clientScript->registerScriptFile($baseUrl.'/js/jquery-1.5.2.min.js');
      $clientScript->registerScriptFile($baseUrl.'/js/i18n/grid.locale-'.JCjqGridInclude::JC_LANGUAGE.'.js');
      $clientScript->registerScriptFile($baseUrl.'/js/jquery.jqGrid.min.js');
      $clientScript->registerCssFile($baseUrl.'/custom-theme/jquery-ui-1.8.16.custom.css');
      $clientScript->registerCssFile($baseUrl.'/css/ui.jqgrid.css');
      
   }
}  
?>
